import React, {Component} from 'react';

import Text from './text';
import Text2 from './text2';
// const ThemeContext = React.createContext('light');
import { ThemeContext } from './createContext';    //引入
class View extends Component{
    render(){
        return(
            <React.Fragment>
                <h3>context</h3>
                <ThemeContext.Provider value="dark">
                    <Text />
                    <Text2 />
                </ThemeContext.Provider>
            </React.Fragment>
        )
    }
}

export default View;
